﻿<Window x:Class="Bookinist.Views.ProgressWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Bookinist.Views"
        mc:Ignorable="d"
        DataContext="{Binding RelativeSource={RelativeSource AncestorType=local:ProgressWindow}}"
        Title="Прогресс" Height="250" Width="500">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" Text="{Binding Status}" Margin="5,20"/>
        <Grid Grid.Row="1" Margin="10,0,10,10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ProgressBar Grid.Column="0" Name="ProgressView" VerticalAlignment="Center" Height="20" IsIndeterminate="True" Maximum="1"/>
            <TextBlock Grid.Column="1" Text="{Binding ProgressValue, StringFormat=p1}" Margin="10,0" VerticalAlignment="Center" TextAlignment="Right" MinWidth="40"/>
            <Button Grid.Column="2" Name="CancelButton" Content="Cancel" 
                    Margin="10,5" Padding="30,10" Background="WhiteSmoke" 
                    IsEnabled="False"
                    Click="CancelButton_Click"/>
        </Grid>
    </Grid>
</Window>
